{extend name="main" /}

{block name="body"}
{include file="breadcrumb" /}
<div class="layui-fluid">
    <table class="layui-table" style="margin-top: 0;">
        <tr>
            <th><b>id</b></th>
            <th><b>题目</b></th>
            <th><b>作者</b></th>
            <th><b>内容</b></th>
            <th><b>语音</b></th>
            <th style="padding: 0 15px;line-height: 40px;">
                <b>操作</b>
                <span style="float: right">
                    <a href="{:url('add')}" data-width="600px" data-height="450px" class="layui-btn layui-btn-sm xn_open" title="添加古诗">添加古诗</a>
                </span>
            </th>
        </tr>

        <tbody>
        {foreach name="list" item="vo"}
        <tr>
            <td>{$vo.id}</td>
            <td>
                {$vo.title}
            </td>
            <td class="layui-form">
                {$vo.author}
            </td>
            <td class="layui-form">
                {$vo.content}
            </td>
            <td>
                {if($vo.record)}
                <audio style="height: 30px;" controls="true" src="{:asset($vo.record)}"></audio>
                {/if}
            </td>
            <td>
                <a href="{:url('edit', ['id'=>$vo['id']])}" data-width="600px" data-height="450px" title="修改" class="layui-btn layui-btn-normal layui-btn-xs xn_open">
                    <i class="layui-icon layui-icon-edit"></i>修改
                </a>
                <a href="{:Url('delete', ['id'=>$vo['id']])}" title="确认要删除【{$vo.title}】吗？" class="layui-btn layui-btn-danger layui-btn-xs xn_delete">
                    <i class="layui-icon layui-icon-delete"></i>删除
                </a>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="pages">{$list|raw}</div>
</div>
{/block}

{block name="js"}
<script>
   
</script>
{/block}